home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / gfx / x11 / x3270_3_2_16.lha / amiga_src / appres.h < prev    next >
C/C++ Source or Header  |  2009-02-14  |  4KB  |  178 lines

  1. /*
  2.  * Modifications Copyright 1993, 1994, 1995, 1996, 1999, 2000 by Paul Mattes.
  3.  * Copyright 1990 by Jeff Sparkes.
  4.  *  Permission to use, copy, modify, and distribute this software and its
  5.  *  documentation for any purpose and without fee is hereby granted,
  6.  *  provided that the above copyright notice appear in all copies and that
  7.  *  both that copyright notice and this permission notice appear in
  8.  *  supporting documentation.
  9.  */
  10.  
  11. /*
  12.  *    appres.h
  13.  *        Application resource definitions for x3270.
  14.  */
  15.  
  16. /* Toggles */
  17.  
  18. enum toggle_type { TT_INITIAL, TT_TOGGLE, TT_FINAL };
  19. struct toggle {
  20.     Boolean value;        /* toggle value */
  21.     Boolean changed;    /* has the value changed since init */
  22.     Widget w[2];        /* the menu item widgets */
  23.     const char *label[2];    /* labels */
  24.     void (*upcall)(struct toggle *, enum toggle_type); /* change value */
  25. };
  26. #define MONOCASE    0
  27. #define ALT_CURSOR    1
  28. #define CURSOR_BLINK    2
  29. #define SHOW_TIMING    3
  30. #define CURSOR_POS    4
  31.  
  32. #if defined(X3270_TRACE) /*[*/
  33. #define DS_TRACE    5
  34. #endif /*]*/
  35.  
  36. #define SCROLL_BAR    6
  37.  
  38. #if defined(X3270_ANSI) /*[*/
  39. #define LINE_WRAP    7
  40. #endif /*]*/
  41.  
  42. #define BLANK_FILL    8
  43.  
  44. #if defined(X3270_TRACE) /*[*/
  45. #define SCREEN_TRACE    9
  46. #define EVENT_TRACE    10
  47. #endif /*]*/
  48.  
  49. #define MARGINED_PASTE    11
  50. #define RECTANGLE_SELECT 12
  51.  
  52. #define N_TOGGLES    13
  53.  
  54. #define toggled(ix)        (appres.toggle[ix].value)
  55. #define toggle_toggle(t) \
  56.     { (t)->value = !(t)->value; (t)->changed = True; }
  57.  
  58. /* Application resources */
  59.  
  60. typedef struct {
  61.     /* Basic colors */
  62. #if defined(X3270_DISPLAY) /*[*/
  63.     Pixel    foreground;
  64.     Pixel    background;
  65. #endif /*]*/
  66.  
  67.     /* Options (not toggles) */
  68.     Boolean mono;
  69.     Boolean extended;
  70.     Boolean m3279;
  71.     Boolean modified_sel;
  72.     Boolean    once;
  73. #if defined(X3270_DISPLAY) /*[*/
  74.     Boolean visual_bell;
  75.     Boolean menubar;
  76.     Boolean active_icon;
  77.     Boolean label_icon;
  78.     Boolean invert_kpshift;
  79.     Boolean use_cursor_color;
  80.     Boolean allow_resize;
  81.     Boolean no_other;
  82.     Boolean do_confirms;
  83.     Boolean reconnect;
  84.     Boolean visual_select;
  85. # if defined(X3270_KEYPAD) /*[*/
  86.     Boolean    keypad_on;
  87. # endif /*]*/
  88. #endif /*]*/
  89.     Boolean    apl_mode;
  90.     Boolean scripted;
  91.     Boolean numeric_lock;
  92.     Boolean secure;
  93.     Boolean oerr_lock;
  94.     Boolean    typeahead;
  95.     Boolean debug_tracing;
  96.     Boolean disconnect_clear;
  97.     Boolean highlight_bold;
  98.     Boolean highlight_select;
  99.  
  100.     /* Named resources */
  101. #if defined(X3270_KEYPAD) /*[*/
  102.     char    *keypad;
  103. #endif /*]*/
  104. #if defined(X3270_DISPLAY) || defined(C3270) /*[*/
  105.     char    *key_map;
  106.     char    *compose_map;
  107. #endif /*]*/
  108. #if defined(X3270_DISPLAY) /*[*/
  109.     char    *efontname;
  110.     char    *afontname;
  111.     char    *font_list;
  112.     char    *debug_font;
  113.     char    *icon_font;
  114.     char    *icon_label_font;
  115.     int    save_lines;
  116.     char    *normal_name;
  117.     char    *select_name;
  118.     char    *bold_name;
  119.     char    *colorbg_name;
  120.     char    *keypadbg_name;
  121.     char    *selbg_name;
  122.     char    *cursor_color_name;
  123.     char    *color_scheme;
  124.     int    bell_volume;
  125.     char    *char_class;
  126.     int    modified_sel_color;
  127.     int    visual_select_color;
  128. #endif /*]*/
  129.     char    *model;
  130.     char    *hostsfile;
  131.     char    *port;
  132.     char    *charset;
  133.     char    *termname;
  134.     char    *macros;
  135.     char    *trace_dir;
  136. #if defined(X3270_TRACE) /*[*/
  137.     char    *trace_file;
  138.     char    *screentrace_file;
  139. #endif /*]*/
  140.     char    *oversize;
  141. #if defined(X3270_FT) /*[*/
  142.     char    *ft_command;
  143. #endif /*]*/
  144.     char    *connectfile_name;
  145.  
  146.     /* Toggles */
  147.     struct toggle toggle[N_TOGGLES];
  148.  
  149. #if defined(X3270_DISPLAY) /*[*/
  150.     /* Simple widget resources */
  151.     Cursor    normal_mcursor;
  152.     Cursor    wait_mcursor;
  153.     Cursor    locked_mcursor;
  154. #endif /*]*/
  155.  
  156. #if defined(X3270_ANSI) /*[*/
  157.     /* Line-mode TTY parameters */
  158.     Boolean    icrnl;
  159.     Boolean    inlcr;
  160.     char    *erase;
  161.     char    *kill;
  162.     char    *werase;
  163.     char    *rprnt;
  164.     char    *lnext;
  165.     char    *intr;
  166.     char    *quit;
  167.     char    *eof;
  168. #endif /*]*/
  169.  
  170. #if defined(USE_APP_DEFAULTS) /*[*/
  171.     /* App-defaults version */
  172.     char    *ad_version;
  173. #endif /*]*/
  174.  
  175. } AppRes, *AppResptr;
  176.  
  177. extern AppRes appres;
  178.